#pragma once

#include <DirectXMath.h>

class PointLight
{
public:
	PointLight(const PointLight&);
	PointLight(DirectX::XMFLOAT4 ambientColor,
		DirectX::XMFLOAT4 diffuseColor,
		DirectX::XMFLOAT3 position,
		DirectX::XMFLOAT3 lookat,
		float near,
		float far);
	~PointLight();

	void SetAmbientColor(float r, float g, float b, float a);
	void SetDiffuseColor(float r, float g, float b, float a);
	void SetPosition(float x, float y, float z);
	void SetLookAt(float x, float y, float z);
	void SetProjection(float near, float far);
	void SetNear(float near);
	void SetFar(float far);

	DirectX::XMFLOAT4 GetAmbientColor(void) const;
	DirectX::XMFLOAT4 GetDiffuseColor(void) const;
	DirectX::XMFLOAT3 GetPosition(void) const;

	DirectX::XMMATRIX GetViewMatrix() const;
	DirectX::XMMATRIX GetProjectionMatrix() const;
private:
	void GenerateViewMatrix(void);
	void GenerateProjectionMatrix(void);

	DirectX::XMFLOAT4 m_ambientColor;
	DirectX::XMFLOAT4 m_diffuseColor;
	DirectX::XMFLOAT3 m_position;
	DirectX::XMFLOAT3 m_lookAt;
	DirectX::XMMATRIX m_viewMatrix;
	DirectX::XMMATRIX m_projectionMatrix;
	float m_near;
	float m_far;

	static const DirectX::XMVECTOR M_UP;
};